<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>concat方法</title>
  <script>
    var num1 = [[1]]
    var num2 = [2, [3]]
    var num3 = [5, [6]]

    var nums = num1.concat(num2)

    console.log(nums)
    // results is [[1], 2, [3]]

    var nums2 = num1.concat(4, num3)

    console.log(nums2)
    // results is [[1], 4, 5,[6]]

    // modify the first element of num1
    num1[0].push(4)

    console.log(nums)
    // results is [[1, 4], 2, [3]]
  </script>
</head>
<body>

</body>
</html>